package com.ocom.payconfig.client;

import com.ocom.common.constant.PayHandleUrl;
import com.ocom.common.entity.card.EntityXfRecordProcess;
import com.ocom.common.request.payhandle.*;
import com.ocom.common.resp.Result;
import com.ocom.common.vo.pyhandle.GetDeviceInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;

@FeignClient(value = "payhandle")
public  interface PayhandleClientService {

	@PostMapping(PayHandleUrl.URL_PayHandle_feeRefund)
	Result feeRefund(@RequestBody FeeRefundRequest request);


	@PostMapping(PayHandleUrl.URL_getGoodsListProcessOnDishes)
	public Result getGoodsListProcessOnDishes(@RequestParam("comId") Long comId, @RequestParam("orderNo") String orderNo);

	@PostMapping(PayHandleUrl.URL_getRecordByOrderno)
	public Result getRecordByOrderno(@RequestBody GetRecordByOrderNoRequest request);

//	@PostMapping(PayHandleUrl.URL_SyncOrderBySuccess)
//	public Result SyncOrder(@RequestBody EntiyEntiyXfRecordProcess entiyEntiyXfRecordProcess);

	@PostMapping(PayHandleUrl.URL_OnlinePayQuery)
	public Result onlinePayQuery(@Valid @RequestBody QrCodeQueryRequest request);

	@PostMapping(PayHandleUrl.URL_SyncOrderBySuccess)
	public Result SyncOrder(@RequestBody EntityXfRecordProcess entiyEntiyXfRecordProcess) ;

	@PostMapping(PayHandleUrl.URL_getDeviceInfo)
	public Result<GetDeviceInfoVo> getDeviceInfo(@RequestBody GetDeviceInfoRequest getDeviceInfoRequest);

	@PostMapping(PayHandleUrl.URL_PayHandle_qrCodeRefund)
	public Result qrCodeRefund(@Valid @RequestBody QrCodeRefundRequest request);

	@PostMapping(PayHandleUrl.URL_PayHandle_paraRefundB)
	public Result paraRefundB(@Valid @RequestBody FeeRefundRequest request);

	@PostMapping(PayHandleUrl.URL_PayHandle_getRecordProcess)
	public Result getRecordProcess(@RequestBody GetRecordProcessRequest request);


}
